package com.bjsxt.livegoods.feedback.service.config;

import com.bjsxt.livegoods.dao.feedback.FeedbackDao;
import com.bjsxt.livegoods.dao.feedback.FeedbackDaoImpl;
import com.bjsxt.livegoods.dao.order.OrderDao;
import com.bjsxt.livegoods.dao.order.OrderDaoImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;

@Configuration
public class FeedBackConfiguration {

    @Bean
    public FeedbackDao feedbackDao(MongoTemplate mongoTemplate){
        FeedbackDaoImpl feedbackDao=new FeedbackDaoImpl();
        feedbackDao.setMongoTemplate(mongoTemplate);
        return feedbackDao;
    }

    @Bean
    public OrderDao orderDao(MongoTemplate mongoTemplate){
        OrderDaoImpl orderDao=new OrderDaoImpl();
        orderDao.setMongoTemplate(mongoTemplate);
        return orderDao;
    }
}
